/*     */ package com.cr.business;
/*     */ 
/*     */ import com.cr.business.domain.CrEvidenceInfo;
/*     */ import com.cr.business.service.ICrEvidenceInfoService;
/*     */ import com.cr.common.annotation.Log;
/*     */ import com.cr.common.core.controller.BaseController;
/*     */ import com.cr.common.core.domain.AjaxResult;
/*     */ import com.cr.common.core.page.TableDataInfo;
/*     */ import com.cr.common.enums.BusinessType;
/*     */ import com.cr.common.utils.poi.ExcelUtil;
/*     */ import java.util.List;
/*     */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/*     */ import org.springframework.beans.factory.annotation.Autowired;
/*     */ import org.springframework.stereotype.Controller;
/*     */ import org.springframework.ui.ModelMap;
/*     */ import org.springframework.web.bind.annotation.GetMapping;
/*     */ import org.springframework.web.bind.annotation.PathVariable;
/*     */ import org.springframework.web.bind.annotation.PostMapping;
/*     */ import org.springframework.web.bind.annotation.RequestMapping;
/*     */ import org.springframework.web.bind.annotation.ResponseBody;
/*     */ 
/*     */ @Controller
/*     */ @RequestMapping({"/business/info"})
/*     */ public class CrEvidenceInfoController extends BaseController {
/*  32 */   private String prefix = "business/info";
/*     */   
/*     */   @Autowired
/*     */   private ICrEvidenceInfoService crEvidenceInfoService;
/*     */   
/*     */   @RequiresPermissions({"business:info:view"})
/*     */   @GetMapping
/*     */   public String info() {
/*  41 */     return this.prefix + "/info";
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:info:list"})
/*     */   @PostMapping({"/list"})
/*     */   @ResponseBody
/*     */   public TableDataInfo list(CrEvidenceInfo crEvidenceInfo) {
/*  52 */     startPage();
/*  53 */     List<CrEvidenceInfo> list = this.crEvidenceInfoService.selectCrEvidenceInfoList(crEvidenceInfo);
/*  54 */     return getDataTable(list);
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:info:export"})
/*     */   @Log(title = "证据信息", businessType = BusinessType.EXPORT)
/*     */   @PostMapping({"/export"})
/*     */   @ResponseBody
/*     */   public AjaxResult export(CrEvidenceInfo crEvidenceInfo) {
/*  66 */     List<CrEvidenceInfo> list = this.crEvidenceInfoService.selectCrEvidenceInfoList(crEvidenceInfo);
/*  67 */     ExcelUtil<CrEvidenceInfo> util = new ExcelUtil(CrEvidenceInfo.class);
/*  68 */     return util.exportExcel(list, "证据信息数据");
/*     */   }
/*     */   
/*     */   @GetMapping({"/add"})
/*     */   public String add() {
/*  77 */     return this.prefix + "/add";
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:info:add"})
/*     */   @Log(title = "证据信息", businessType = BusinessType.INSERT)
/*     */   @PostMapping({"/add"})
/*     */   @ResponseBody
/*     */   public AjaxResult addSave(CrEvidenceInfo crEvidenceInfo) {
/*  89 */     return toAjax(this.crEvidenceInfoService.insertCrEvidenceInfo(crEvidenceInfo));
/*     */   }
/*     */   
/*     */   @GetMapping({"/edit/{evidenceId}"})
/*     */   public String edit(@PathVariable("evidenceId") Long evidenceId, ModelMap mmap) {
/*  98 */     CrEvidenceInfo crEvidenceInfo = this.crEvidenceInfoService.selectCrEvidenceInfoByEvidenceId(evidenceId);
/*  99 */     mmap.put("crEvidenceInfo", crEvidenceInfo);
/* 100 */     return this.prefix + "/edit";
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:info:edit"})
/*     */   @Log(title = "证据信息", businessType = BusinessType.UPDATE)
/*     */   @PostMapping({"/edit"})
/*     */   @ResponseBody
/*     */   public AjaxResult editSave(CrEvidenceInfo crEvidenceInfo) {
/* 112 */     return toAjax(this.crEvidenceInfoService.updateCrEvidenceInfo(crEvidenceInfo));
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:info:remove"})
/*     */   @Log(title = "证据信息", businessType = BusinessType.DELETE)
/*     */   @PostMapping({"/remove"})
/*     */   @ResponseBody
/*     */   public AjaxResult remove(String ids) {
/* 124 */     return toAjax(this.crEvidenceInfoService.deleteCrEvidenceInfoByEvidenceIds(ids));
/*     */   }
/*     */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\classes\com.zip!\com\cr\business\CrEvidenceInfoController.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */